<?php

/**
 * SfAudit form base class.
 *
 * @package    tercermilenio
 * @subpackage form
 * @author     Your name here
 */
class BaseSfAuditForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                => new sfWidgetFormInputHidden(),
      'remote_ip_address' => new sfWidgetFormInput(),
      'object'            => new sfWidgetFormInput(),
      'object_key'        => new sfWidgetFormInput(),
      'object_changes'    => new sfWidgetFormTextarea(),
      'query'             => new sfWidgetFormTextarea(),
      'user'              => new sfWidgetFormInput(),
      'type'              => new sfWidgetFormInput(),
      'created_at'        => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'                => new sfValidatorPropelChoice(array('model' => 'SfAudit', 'column' => 'id', 'required' => false)),
      'remote_ip_address' => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'object'            => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'object_key'        => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'object_changes'    => new sfValidatorString(array('required' => false)),
      'query'             => new sfValidatorString(array('required' => false)),
      'user'              => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'type'              => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'created_at'        => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('sf_audit[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'SfAudit';
  }


}
